﻿using Avalonia;
using Avalonia.Controls;
using SukiUI.Controls;

namespace Launcher;

public partial class SettingWindow : SukiWindow
{
    public SettingWindow(Window parent)
    {
        InitializeComponent();
        DataContext = new SettingModel(this);
        var screenScaling = Screens.ScreenFromVisual(this)?.Scaling ?? 1;
        var x = parent.Position.X + (parent.Width - Width) / 2 * screenScaling;
        var y = parent.Position.Y + (parent.Height - Height) / 2 * screenScaling;
        Position = new PixelPoint((int)x,(int)y);
    }
}